﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PopupUserQueryStation.aspx.cs" Inherits="MTRC.ODMS.Web.SOM.Popup.PopupUserQueryStation" %>
<%@ Register Assembly="APJ.Web.UI.WebControls" Namespace="APJ.Web.UI.WebControls" TagPrefix="APJ" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>UserQueryStation</title>
    <base target="_self" />
    <meta http-equiv="Expires" content="0" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <script type="text/javascript" src="../../Javascript/Menu/MainMenu.js"></script>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" /> 
    <link href="<%=ResolveUrl("~/JqueryUICombox/jquery-ui.css")%>" rel="stylesheet" type="text/css" />
    <script src="<%=ResolveUrl("~/jQuery/jquery-1.6.2.min.js")%>"  type="text/javascript"></script>
    <script src="<%=ResolveUrl("~/JqueryUICombox/jquery-ui.js")%>" type="text/javascript"></script>
    <script src="<%=ResolveUrl("~/JqueryUICombox/combox.js")%>" type="text/javascript"></script>
    <style type="text/css">
         /* Add by jack 20150612 for U25 */
        .HiddenTextBox
        {
          display:none;   
        }
    </style>
    <script type="text/jscript">
        $(function () {
            InitCombobox();
        });

        function InitCombobox() {
            $(".combobox").combobox();
            $("#toggle").click(function () {
                $(".combobox").toggle();
            });
            $(".custom-combobox").css({ "height": "20px" });
            $(".custom-combobox input").css({ "width": "130px", "height": "18px", "line-height": "18px" });
            $(".custom-combobox a").css({ "width": "16px", "height": "20px", "position": "relative", "top": "-3px", "left": "-1px" });

            $(".custom-combobox input").mouseout(function () {
                if (document.getElementById("txtSelectedValue").value != $(".custom-combobox input").val()) {
                    document.getElementById("txtSelectedValue").value = $(".custom-combobox input").val();
                }
            });
        }
        
        function ClearStation() {
            $(".custom-combobox input").val('');
        }

        function PersonHoldStation(PersonHoldStationKye) {
            dialogArguments.document.getElementById("hdnPersonHoldStationKye").value = PersonHoldStationKye;
            dialogArguments.PersonSelectdStation_CallBackValue = true;
            window.close();
        }

        function Cancel_Click() {
            dialogArguments.PersonSelectdStation_CallBackValue = false;
            self.close();
            return false;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id="searchcondition" style=" width:99%; float:left;border-width:1px; border-color:#aaaaaa; border-style:solid;background-color: #eeeeee; padding-left: 10px;">
            <table border="0px" width="100%">
                <tr>
                    <td style="width:210px;">
                        <asp:Label ID="lblStationLable" runat="server"></asp:Label>
                        &nbsp;                 
                        <asp:DropDownList ID="ddlStation" CssClass="combobox" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlStation_SelectedIndexChanged">
                        <%--<asp:DropDownList ID="ddlStation"  Width="150" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlStation_SelectedIndexChanged">--%>
                        </asp:DropDownList>
                        <%--<asp:TextBox runat="server" ID="txtSelectedValue" CssClass="HiddenTextBox" ClientIDMode="Static" OnTextChanged="SelectValue_OnTextChanged"  onpropertychange="__doPostBack('txtSelectedValue',null)"></asp:TextBox>--%>
                        <asp:TextBox runat="server" ID="txtSelectedValue" CssClass="HiddenTextBox" ClientIDMode="Static"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Button ID="btnClear" runat="server" Text="" OnClick="btnClear_Click"/>&nbsp;
                        <asp:Button ID="btnAddNew" runat="server" Text="" OnClick="btnAddNew_Click"/>&nbsp;
                    </td>
                </tr>
            </table>           
        </div>
        <div id="datagrid" style=" width:100% ;padding-left: 1px;padding-top:5px;">
            <APJ:CommonGridView ID="grdSearchResult" runat="server" AllowPaging="True" AllowSorting="True" AscPic="~/Images/Common/arrow_up_green.png" AutoGenerateColumns="False" BorderColor="black" CssClass="GridView" DescPic="~/Images/Common/arrow_down_green.png" BackColor="White" BorderWidth="1px" OnRowDataBound="grdSearchResult_RowDataBound" OnRowCommand="grdSearchResult_RowCommand" DataKeyNames="" PageLinkCount="7">
                <PagerTemplate>
                    <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                        <asp:TableRow ID="COMGRIDV_TR" runat="server">
                            <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                &nbsp; &nbsp;
                                <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                &nbsp;<asp:Label ID="Label1" runat="server">/</asp:Label>
                                &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                            </asp:TableCell>
                            <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                    <asp:ListItem Value="5">5</asp:ListItem>
                                    <asp:ListItem Value="10">10</asp:ListItem>
                                    <asp:ListItem Value="15">15</asp:ListItem>
                                    <asp:ListItem Value="20">20</asp:ListItem>
                                    <asp:ListItem Value="25">25</asp:ListItem>
                                    <asp:ListItem Value="30">30</asp:ListItem>
                                </asp:DropDownList>
                            </asp:TableCell>
                            <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                            </asp:TableCell>
                            <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                </asp:Panel>
                            </asp:TableCell>
                            <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                            </asp:TableCell>
                        </asp:TableRow>
                    </asp:Table>
                </PagerTemplate>
                <RowStyle CssClass="GridView_Row" />
                <HeaderStyle CssClass="GridView_Header" BackColor="#D1F2FF" Font-Bold="True" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Strikeout="False" Font-Underline="False" ForeColor="#022D72" />
                <AlternatingRowStyle CssClass="GridView_AlternativeRow" BackColor="Silver" />
                <Columns>
                    <asp:BoundField DataField="LocationCode"  HeaderText="SOM_PopupUserQueStation_LocationCode" SortExpression="LocationCode">
                    </asp:BoundField>
                    <asp:BoundField DataField="LocationDescription"  HeaderText="SOM_PopupUserQueStation_LocationDescription" SortExpression="LocationDescription">
                    </asp:BoundField>
                    <asp:TemplateField  HeaderText="SOM_PopupUserQueStation_Delete" ItemStyle-HorizontalAlign="Center">
                    <ItemStyle width="30px"/>
                    <itemtemplate>
                    <asp:ImageButton id="Btn_delete" ToolTip=<%# this.GetLabel("COM_Delete") %> runat="server" CssClass="link" CommandName="Delete" CommandArgument='<%# Eval("UserQueryCriteriaID")+"-"+Eval("LocationID") %>' ImageUrl="../../Images/SOM/grid_delete.gif"></asp:ImageButton>  
                    </itemtemplate>
                </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="White" ForeColor="#000066" />                                      
                <EmptyDataRowStyle CssClass="GridView_Header" />
                <EmptyDataTemplate>
                    <asp:Table ID="Table1" runat="server" CssClass="GridView_Header_EmptyData">
                        <asp:TableRow ID="TableRow1" runat="server">
                            <asp:TableCell ID="TableCell1" runat="server" Style="border-right: black 1px solid;" Width="105px"></asp:TableCell>
                            <asp:TableCell ID="TableCell2" runat="server" Style="border-right: black 1px solid;" Width="105px"></asp:TableCell>
                            <asp:TableCell ID="TableCell3" runat="server" Style="border-right: black 1px solid;" Width="60px"></asp:TableCell>
                            <asp:TableCell ID="TableCell4" runat="server" Style="border-right: black 1px solid;" Width="60px"></asp:TableCell>
                            <asp:TableCell ID="TableCell5" runat="server" Style="border-right: black 1px solid;" Width="130px"></asp:TableCell>
                            <asp:TableCell ID="TableCell6" runat="server" Style="border-right: black 1px solid;" Width="150px"></asp:TableCell>
                            <asp:TableCell ID="TableCell7" runat="server" Style="border-right: black 1px solid;" Width="20px"></asp:TableCell>
                            <asp:TableCell ID="TableCell8" runat="server" Style="border-right: black 1px solid;" Width="20px"></asp:TableCell>
                            <asp:TableCell ID="TableCell9" runat="server" Width="20px"></asp:TableCell>
                        </asp:TableRow>
                    </asp:Table>
                </EmptyDataTemplate>
            </APJ:CommonGridView>
        </div>
        <div id="button" style="text-align:right;">
        <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" TabIndex="42" Width="50px"  />&nbsp;&nbsp;
        <asp:Button ID="btnCancel" runat="server" OnClientClick="return Cancel_Click();" Text="Cancel" Width="50px" />
        </div>
    </div>
    </form>
</body>
</html>
